home *** CD-ROM | disk | FTP | other *** search
- package koala.dynamicjava.tree;
-
- import java.util.LinkedList;
- import java.util.List;
- import koala.dynamicjava.tree.visitor.Visitor;
-
- public class WhileStatement extends Statement implements ContinueTarget {
- public static final String CONDITION = "condition";
- public static final String BODY = "body";
- private Expression condition;
- private Node body;
- private List labels;
-
- public Expression getCondition() {
- return this.condition;
- }
-
- public void setCondition(Expression var1) {
- if (var1 == null) {
- throw new IllegalArgumentException("e == null");
- } else {
- ((Node)this).firePropertyChange("condition", this.condition, this.condition = var1);
- }
- }
-
- public Node getBody() {
- return this.body;
- }
-
- public void setBody(Node var1) {
- if (var1 == null) {
- throw new IllegalArgumentException("node == null");
- } else {
- ((Node)this).firePropertyChange("body", this.body, this.body = var1);
- }
- }
-
- public void addLabel(String var1) {
- if (var1 == null) {
- throw new IllegalArgumentException("label == null");
- } else {
- this.labels.add(var1);
- }
- }
-
- public boolean hasLabel(String var1) {
- return this.labels.contains(var1);
- }
-
- public Object acceptVisitor(Visitor var1) {
- return var1.visit(this);
- }
-
- public WhileStatement(Expression var1, Node var2) {
- this(var1, var2, (String)null, 0, 0, 0, 0);
- }
-
- public WhileStatement(Expression var1, Node var2, String var3, int var4, int var5, int var6, int var7) {
- super(var3, var4, var5, var6, var7);
- if (var1 == null) {
- throw new IllegalArgumentException("cond == null");
- } else if (var2 == null) {
- throw new IllegalArgumentException("body == null");
- } else {
- this.condition = var1;
- this.body = var2;
- this.labels = new LinkedList();
- }
- }
- }
-